﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace Kinematic
{
    public class Objetos : Kinematic
    {
        public Color cc = Color.White;
        protected Texture2D textura;
        public BoundingBox Box;
        public BoundingSphere Sphere;
        public float Radius = 40.0f;

        public Objetos(ContentManager content, String Ubicacion, Vector3 Position, float Orientation)
            : base()
        {
            this.Orientation = Orientation;
            this.Position = Position;
            this.textura = content.Load<Texture2D>(Ubicacion);
            Box = new BoundingBox(Position, Position + new Vector3(textura.Width, 0.0f, textura.Height));
            Sphere = new BoundingSphere(Position, Radius);
        }

        public void Update()
        {
            Sphere = new BoundingSphere(Position, Radius);
        }

        public void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(this.textura, new Vector2(this.Position.X, this.Position.Z), null, cc, 0.0f, new Vector2(this.textura.Width / 2, this.textura.Height / 2), 1.0f, SpriteEffects.None, 0);
        }

    }
}
